<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-control" content="no-cache">
    <meta http-equiv="Cache" content="no-cache">
    <meta http-Equiv="Expires" Content="0" />
    <title>监控列表</title>
    <link rel="stylesheet" href="/lib/layui/css/layui.css"/>
</head>
<style>
    body {
        background-color: #FFF;
    }
    .layui-elem-field{
      background: #FFF;
      padding: 20px;
    }
	.grid-demo{
			min-height: 100px;
		    background: #FFF;
		    padding: 10px 10px;
		    border-radius: 2px;
		    box-shadow: 5px 5px 1px #b2b2b2;
	}  
	.div-inline{ display:inline;float: left;width: 360px;margin-left: 20px;} 
</style>
<body>

 <!-- 弹出层 --> 
  <div id="layelDetail" style="display: ;">
	  	  <div class="grid-demo" id="detail_container">
		        <div class="layui-card-body">		       
			        <p>当前CPU内存监控: 单位(MB)</p>
			        <p>
			        	总内存：<span >{{targetInstance.server.mem.total}} GB</span> 
			        	<span style="float: right;">JVM总内存：<span>{{ targetInstance.server.jvm.total }} MB</span></span> 
			        </p>
			        <p>
			        	已用内存：<span>{{ targetInstance.server.mem.used }} GB</span>
			        	<span style="float: right;">JVM已用内存：<span>{{ targetInstance.server.jvm.used  }} MB</span></span> 
			        </p> 
			        <p>
			        	剩余内存：<span>{{ targetInstance.server.mem.free }} GB</span>
			        	<span style="float: right;">JVM剩余内存：<span>{{ targetInstance.server.jvm.free }} MB</span></span> 
			        </p> 	
			        <p>
			        	使用率：<span >{{targetInstance.server.mem.usage }} %</span>
			        	<span style="float: right;">JVM使用率：<span>{{targetInstance.server.jvm.usage }} %</span></span> 
			        </p>
			        <div class="layui-progress" style="margin-top: 10px;margin-bottom: 10px;">
			       		 <div class="layui-progress-bar" lay-percent="100%"></div>
			        </div>      
		      	</div>    
			        
			        <p>Java虚拟机信息</p> 
			      
			        	<p>Java名称：<span >{{targetInstance.server.jvm.name}}</span></p>
			        	<p>Java版本：<span>{{targetInstance.server.jvm.version}}</span></p>
			        	<p>启动时间：<span>{{targetInstance.server.jvm.startTime}}</span></p>
			        	<p>运行时间：<span>{{targetInstance.server.jvm.runTime}}</span></p>
			        	<p>安装路径:<span>{{targetInstance.server.jvm.home}}</span></p>
			        	<p>项目路径:<span>{{targetInstance.server.sys.userDir}}</span></p>			   
		    
		       		  <div class="layui-progress" style="margin-top: 10px;margin-bottom: 10px;">
			       		 <div class="layui-progress-bar" lay-percent="100%"></div>
			        </div>      
			        <p>服务器信息</p>
			         			      
			        <p>服务器名称：<span>{{targetInstance.server.sys.computerName}}</span></p>
			        <p>操作系统：<span>{{targetInstance.server.sys.osName}}</span></p>		 
			        <p>服务器IP：<span>{{targetInstance.server.sys.computerIp}}</span></p>	
			        <p>系统架构：<span>{{targetInstance.server.sys.osArch}}</span></p>	 
			        
			        <div class="layui-progress" style="margin-top: 10px;margin-bottom: 10px;">
			       		 <div class="layui-progress-bar" lay-percent="100%"></div>
			        </div>      
			        <p>磁盘状态</p>
			         			      
						<table class="layui-table" lay-size="sm" lay-skin="nob">
                                        <thead>
                                            <tr>
                                                <th>盘符路径</th>
                                                <th>文件系统</th>
                                                <th>盘符类型</th>
                                                <th>总大小</th>
                                                <th>可用大小</th>
                                                <th>已用大小</th>
                                                <th>已用百分比</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <tr  v-for="sysFile in targetInstance.server.sysFiles" >
                                                <td>{{sysFile.dirName}}</td>
                                                <td>{{sysFile.sysTypeName}}</td>
                                                <td>{{sysFile.typeName}}</td>
                                                <td>{{sysFile.total}}</td>
                                                <td>{{sysFile.free}}</td>
                                                <td>{{sysFile.used}}</td>
                                                <td>{{sysFile.usage}} %</td>
                                                
                                            </tr>
                                        </tbody>
                                    </table>   
		      		  </div>
		        </div>

<script src="/lib/layui/layui.all.js"></script>
<script src="/lib/jquery.min.js"></script>
<script src="/lib/vue.min.js"></script>
<script src="/lib/store.min.js"></script>
<script type="text/javascript">
//由于模块都一次性加载，因此不用执行 layui.use() 来加载对应模块，直接使用即可：
	 var detail_vm = new Vue({
                     el: "#detail_container",
                     data: {
                    	 targetInstance:{"date":"","server":{"jvm":{},"mem":{},"sysFiles":[],"cpu":{},"sys":{},"runningInstance":""},"name":"","groupKey":"","url":"","instanceKey":""},
                     },
                     mounted : function() {
                 		var _this=this;
                 		_this.targetInstance=store.get('_targetInstance_deatil');
                	},
                     methods: {
                         
                     }
}); 


</script>
</body>
</html>